import { ICellData, IWorkbookData, Univer } from '@univerjs/core';
import { FUniver } from '@univerjs/facade';
import * as echarts from 'echarts';

export interface IJnpfUniver extends Univer {}

export interface IJnpfUniverAPI extends FUniver {}

export interface State {
  containerEleId: any;

  univer: any;
  jnpfUniverAPI: any;

  activeWorkbook: any;
  activeWorkbookId: any;
  activeWorksheet: any;
  activeWorksheetId: any;

  selectionChangeMonitor: any;
  beforeCommandExecuteMonitor: any;
  commandExecuteMonitor: any;

  isHiddenGridlines: boolean;

  loading: boolean;
  [prop: string]: any;
}

export interface CreateUnitProps {
  mode?: 'design' | 'preview' | 'print';

  snapshot?: IWorkbookData;
  echarts?: Record<string, any>;

  uiHeader?: boolean;
  uiFooter?: boolean;
  uiContextMenu?: boolean;

  readonly?: boolean;

  defaultActiveSheetId?: string;

  loading?: boolean;
}

export interface DeliverEchartOptionProps {
  drawingId: string;
  echartType: 'bar' | 'line' | 'pie';
  option: echarts.EChartsOption;
}

export interface DeliverCellDataProps {
  startColumn: number;
  startRow: number;
  cellData: ICellData;
}
